Skip to content

build: pin toolchain and neutralize stale host GOROOT#23

Open
syscod3 wants to merge 1 commit into
mainfrom
build/toolchain-goroot-fix
Open

build: pin toolchain and neutralize stale host GOROOT#23
syscod3 wants to merge 1 commit into
mainfrom
build/toolchain-goroot-fix

Conversation

@syscod3

@syscod3 syscod3 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Fixes 'compile: version go1.X.0 does not match go tool version go1.Y.Z' build failures caused by a stale GOROOT exported by the host shell (pointing at a different Go than the mise-managed toolchain on PATH).

Changes

  • Makefile: unexport GOROOT — every recipe uses the go binary's own GOROOT, independent of the host's Go install.
  • .mise.toml: [env] GOROOT = false — under mise activation, the pinned go = "1.25.8" toolchain is used regardless of any host GOROOT.

Verification

make build and GOOS=linux mise exec -- go build ./... both pass with a stale GOROOT=/usr/local/Cellar/go/1.26.0/libexec still exported.

Independent of any feature work; landing on main so all agents/devs get a reproducible build.

@syscod3 syscod3 force-pushed the build/toolchain-goroot-fix branch from af196c0 to b8e3536 Compare July 4, 2026 09:59
… GOROOT

Move to a reproducible, host-independent Go toolchain via go.mod's
`toolchain go1.26.4` directive: with GOTOOLCHAIN=auto, every go command
fetches (checksum-verified via the module mirror) and runs exactly go1.26.4
regardless of the host's installed Go. Aligns go.mod, .mise.toml, and CI
GO_VERSION on 1.26, which also lets setup-envtest@latest install (it now
requires go >= 1.26), fixing the CI unit-test job.

Makefile unexports GOROOT and .mise.toml unsets it so a stale host GOROOT
(pointing at a different Go install/patch) cannot cause 'compile: version
mismatch' — still needed on 1.26 since the host GOROOT patch may differ from
the pinned toolchain.
@syscod3 syscod3 force-pushed the build/toolchain-goroot-fix branch from b8e3536 to 1f84e15 Compare July 4, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant